2019_Fall_cadp_40423217_Personal_page

V-rep << Previous Next >> Python_area

Inverse kinematics tutorial

線上英英翻譯:https://www.merriam-webster.com/

正文翻譯:

Inverse kinematics tuturial
反向(Inverse)運動學(Kinematics)手把手教學(tutorial)

This tutorial will try to explain how to use the inverse kinematics functionality, while building a 7 DoF redundant manipulator.
本文章嘗試去解釋如何在建立一個七自由度冗餘機械手臂操作(7 DoF redundant manipulator)時,使用反向運度學功能(inverse kinematics functionlity)。

But before that, make sure to have a look at the various simple example scenes related to IK and FK in folder scenes.
但是在那之前,先確定(make sure)了解幾個各式各樣簡單的範例,當中和結合(folded:摺疊、合體的)狀況下 IK 和 FK 之間的關聯性。

For this tutorial,we will build a non-dynamic manipulator, that just uses inverse kinematics without using any physics engine functionality
手把手教學中我們會建立一個沒有物理引擎功能的反向運動機構,進行非動態(non-dynamic)的操作。

The V-REP CAD data related to this tutorial ("redundantManipulator.stl") is located in V-REP's installation folder's "cadFiles" folder.
本教學在 V-REP CAD 使用的檔案為"redundantManipulator.stl"位於 V-REP 安裝資料夾" cadFiles"

A V-REP scene related to this tutorial can be found in V-REP's installation folder's "tutorials\InverseKinematics" folder.
本教學可以在 V-REP 安裝資料夾 "tutorials\InverseKinematics"。

Click [Menu bar --> File --> Import --> Mesh...] then select the file to import. Also refer to the section on how to import/export shapes.
[Menu bar --> File --> Import --> Mesh...]選擇檔案並按上述步驟進行檔案匯入,再者可以參考(refer)import/export shapes

A dialog pops open asking about mesh scaling and mesh orientation. Click Ok. A single simple shape was imported and is located in the middle of the scene. The shape also appears in the scene hierarchy on the left hand side of the main window. 
彈出的對話視窗會詢問關於網格縮放(scaling)和網格取向(orientation),點選"OK"後, 圖示 simple shape 會出現在主操作畫面左側的 scene hierarchy (hierarchy:等級制度)中,模型也會匯入主操作視窗中間的位置。

Depending on how the original CAD data was exported, the imported CAD data could be at a different scale, different location, or even subdivided into several shapes.The assigned color of imported shapes is random.
根據(Depending)原始輸出的建模參數,匯入的模型會出現不一樣的比例、位置、更甚至是細化(subdivide)的部分造型。顏色的分配是隨機的。

Following figure shows the imported shape:
根據數字呈現匯入的幾何造型:

As you can see, the import operation has left us with a single shape, where we expected several shapes.
正如所示,匯入操作在工作室窗裡留下我們想要的幾種造型

This means that we will have to divide the manipulator object ourselves: select the object (just click on it in the scene or the scene hierarchy), then click [Menu bar --> Edit --> Grouping/Merging --> Divide selected shapes]. Following is what you should have:
這意謂著我們必須自行去設置機械手的動作特徵:選擇object(僅需再工作視窗中點選、或是在工作視窗的 scene hierarchy 點選),並且依序 [Menu bar --> Edit --> Grouping/Merging --> Divide selected shapes]。以下是應該有的:

The original shape was divided into several sub-shapes (see also the scene hierarchy). The shape division algorithm operates by grouping all triangles that are linked by common edges.
原始的造型被設置成幾個分型 (也可以在 scene hierarchy )。模型部分的演算(algorithm)操作是由群組三角形邊緣相接合的組立而成。

Depending on how the original mesh was created or exported, such a division procedure cannot be performed. In that case you will have to manually extract shapes in thetriangle edit mode.
根據原始造型被創建或導出的網格,不能執行這樣的畫分程序。在這種情況下,你必須在 triangle edit mode 下手動提取形狀。

Next, we will change colors of the various objects so as to have a nice visual appearance.
接下來我們將會改變各部件的顏色,以便有一個很好的視覺外觀。

First double-click a shape icon in the scene hierarchy. Theshape propertiesdialog opens. While a shape is selected, click onAdjust outside colorin the dialog: this will allow you to adjust the various color components of the outside faces of the selected shape.For now, just adjust the ambient/diffuse color component of your shapes.
首先雙擊在 scene hierarchy 形狀圖標。形狀對話視窗彈出。選擇形狀時,單及對話視窗 Adjust outside color :這將允許您調整所選形狀外部面的各種顏色分量,現在,只需調整形狀的環境/漫反射顏色分量即可。

To transfer the color of one shape to another shape, select both shapes and make sure the last selected shape (indicated with a white bounding box) is the one you want to take the color from, then simply click theApply to selectionbutton in theColorssection of the shape dialog. Feel free to adjust other visual parameters too, like theShading angleparameter, theEdges widthor theEdges color.
要將一個形狀的顏色轉換無另一個形狀,請選擇兩個形狀並確保最後選擇的形狀(用白色邊框表示) 是您要從中獲取顏色的形狀,然後只需單擊“應用於”中的“應用於選擇”按鈕。形狀對話框的顏色部分。您也可以隨意調整其他視覺參數,例如“著色角度”參數,“邊緣”寬度或“邊緣”顏色。

Once you finished coloring, you might have following situation :
完成著色後,你可能會遇到以下情況:

In next step, we will add the 7 joints of the manipulator. One way of doing this is to add the joints into the scene, then specify their appropriate position and orientation (through the position dialog and the orientation dialog).
在下一步中,我們將添加操縱器的7個關節。一種方法是將關節添加到場景中,然後指定其適當的位置和方向(通過位置視窗和方向視窗)。

This is however not possible, when you don't know the exact joint positions as in our case, and so we will have to extract them from the shapes that we have:
然而當你對 joint 不曉得的情況下,是不可能確切關節位置,因此我們必須從我們擁有的形狀中提取它們:

Select all imported shapes and click [Menu bar --> Edit --> Bounding box alignment --> Align selected shapes' coordinate frame with world].
選擇所有導入的形狀,然後單擊 [Menu bar --> Edit --> Bounding box alignment --> Align selected shapes' coordinate frame with world]

This operation guarantees that our bounding boxes are aligned with the absolute reference frame, and given the current manipulator configuration, represents the smallest bounding boxes.
此操作可確保我們的 bounding boxes 與絕對參考框架對齊(aligned),並且在給定當前操縱器配置的情況下,表示最小的 bounding boxes。

Click [Menu bar --> Add --> Joint --> Revolute] to insert a revolute joint into the scene. The default position is at (0;0;0) and its default orientation is vertical, and so the joint is hidden by the manipulator's base cylinder.
單擊 [Menu bar --> Add --> Joint --> Revolute] 將旋轉關節匯入場景。默認位置為(0; 0; 0),其默認方向(orientation)為垂直,因此關節被操縱器的基圓柱隱藏。

While the joint is still selected, ctrl-select the base cylinder, then open the position dialog on the position tab and click the Apply to selection.
當仍然選擇關節時,按住Ctrl鍵選擇基圓柱,然後在 position 選項卡上打開 position dialog,然後單擊 Apply to selection

This just positioned the joint at the exact same coordinates as the base cylinder (this operation however only slightly adjusted the joint's vertical position since it was already almost in position).
這只是將關節定位在與基圓柱完全相同的坐標(coordinates)處(但是這個操作只是稍微(only slightly)調整了關節的垂直位置,因為它已經幾乎就位了)。

Now repeat the procedure for all other joints in the manipulator (remember there should be a total of 7).
現在重複操縱器中所有其他關節的程序(記住總共有7個)。

All joints are in position now, however, some of them have the wrong orientation.
現在所有關節都處於適當位置,然而其中一些關節的方向(orientation)錯誤。

Select all joints that should be aligned with the world's Y-axis, then enter (90,0,0) for the Alpha, Beta and Gamma items in the orientation dialog, on the orientation tab, then click the Apply to selection button.
選擇應與操作介面中的 Y軸 對齊(aligned)的所有關節,然後在 orientation dialog 的方向選項上為Alpha,Beta和Gamma項輸入(90,0,0),接著單擊應用於選擇按鈕。

Next, select the joint that should be aligned with the world's X-axis, then enter (0,90,0) for Alpha, Beta and Gamma. All joints have the right position and orientation now. 
接下來,選擇應與操作介面中的 X軸 對齊(aligned)的關節,然後輸入(0,90,0)Alpha,Beta和Gamma。所有關節現在都具有正確的位置和方向。

You can now adjust the joint sizes (check the Joint length and Joint diameter items) in the joint properties dialog (that you can open by double-clicking a joint icon in the scene hierarchy).
您現在可以在 joint properties 視窗中調整(adjust)關節尺寸(檢查關節長度和關節直徑項目)(可以通過雙擊場景 scene hierarchy 中的關節圖標打開)。

Make sure that all joints are clearly visible. This is what you should have:
確保所有關節清晰可見。這是你應該擁有的:

因資料量龐大造成網頁更新時頻頻出錯,遂以PDF檔案為連結上傳,已可至小組倉儲檢視該項目資料。

V-rep << Previous Next >> Python_area